#pragma once

#pragma	comment(lib,"D3DCompiler.lib")
#include <d3d11.h>
#include <DirectXMath.h>
#include <d3dcommon.h>
#include <d3dcompiler.h>
#include <vector>
#include <d3d11shader.h>
#include "../../../../Components/Materials/Material.h"
#include "../../../../Objects/Lights/Light.h"
class LightAndMaterialShader
{
private:	
protected:
public:
	struct VertexShaderBufferType
	{
		DirectX::XMMATRIX world;
		DirectX::XMMATRIX worldInverseTranspose;
		DirectX::XMMATRIX view;
		DirectX::XMMATRIX projection;
	};
	struct PixelShaderBufferType
	{
		Material::MaterialStructure material;
		DirectX::XMFLOAT4 eyePositionWorld;
		DirectX::XMINT4 lightsNumber;//directional,point,spot
		Light::DirectionalLightStructure directionalLights[100];
		Light::PointLightStructure pointLights[100];
		Light::SpotLightStructure spotLights[100];
	};
	ID3D11VertexShader* vertexShader;
	ID3D11PixelShader* pixelShader;
	ID3D11InputLayout* layout;
	ID3D11Buffer* m_vertexShaderBuffer;
	ID3D11Buffer* m_pixelShaderBuffer;
	LightAndMaterialShader();
	~LightAndMaterialShader();
	void Initialize(ID3D11Device* device);
	void Shutdown();
};